#26 √ resolved
Rick DeNatale

Events with Date parameters failing

Reported by Rick DeNatale | September 27th, 2009 @ 04:41 PM

From: John
Date: Fri, Sep 25, 2009 at 6:13 AM
Subject: [RiCal] Setting dtstart to a date
To: RiCal rical_gem@googlegroups.com

I am trying to set the dtstart value of an Event to a Date, not a date
time. This is to create a 'All Day' event so I don't want the time
set.

However when I try to do this I get this error:

NoMethodError (undefined method for_parent' for 2009/9/30 0:0:0<br/> 0:RiCal::FastDateTime):<br/>    /vendor/gems/ri_cal-0.8.4/lib/ri_cal/property_value/date.rb:131:in<br/>send'    /vendor/gems/ri_cal-0.8.4/lib/ri_cal/property_value/date.rb:131:in
method_missing'    /vendor/gems/ri_cal-0.8.4/lib/ri_cal/properties/event.rb:123:in<br/>dtstart_property='    /vendor/gems/ri_cal-0.8.4/lib/ri_cal/properties/event.rb:128:in
dtstart='    /vendor/gems/ri_cal-0.8.4/lib/ri_cal/component.rb:36:insend'
   /vendor/gems/ri_cal-0.8.4/lib/ri_cal/component.rb:36:in
method_missing'    /lib/workbooks/ui/renderers/ics/ics_renderer.rb:51:instart_tree'

I am passing in a ruby Date object, obtained from a Rails model using
'to_date'.

Should I be passing in something different to set a Date value, or is
there a bug here? I notice PropertyValue::DateTime has a 'for_parent'
method, but FastDateTime doesn't?

Thanks

John.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences

Shared Ticket Bins

People watching this ticket